module eui {
	export class GTextInput extends eui.TextInput{
		private iconImg:eui.Image;

		private _icon:string;
		public constructor() {
			super();
			this.skinName = skins.TextInputSkin;
			this.addEventListener(egret.Event.ADDED_TO_STAGE,this.onAdd,this);
		}

		public set icon(v:string){
			if(this._icon != v){
				this._icon = v;
				if(this.iconImg){
					this.iconImg.source = v;
					this.iconImg.validateNow();
				}
			}
		}

		public get icon():string{
			return this._icon ;
		}

		private onAdd(e:egret.Event):void{
			this.icon = this._icon;
		}
	}
}